home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-05-31 | 2.9 KB | 121 lines | [TEXT/CWIE] |
- // ===========================================================================
- // SCAPIWindow.h ©1997 Spunk Cross All rights reserved.
- // ===========================================================================
-
- #ifndef SCAPIWINDOW_H
- #define SCAPIWINDOW_H
-
- #include "SCAPICommonIncludes.h"
- #include "SCAPIApp.h"
- #include "SCAPIMenuBar.h"
-
-
- // ---------------------------------------------------------------------------
- // • Defines
- // ---------------------------------------------------------------------------
-
- #define SCAPIWindow_default_title "Spunk Cross"
- #define SCAPIWindow_default_originx 5
- #define SCAPIWindow_default_originy 42
- #define SCAPIWindow_default_width 300
- #define SCAPIWindow_default_height 200
-
- #define SCAPIWindow_borders_width 3
- #define SCAPIWindow_borders_height 21
-
- #define SCAPI_no_mark 0
- #define SCAPI_dot_mark 1
- #define SCAPI_check_mark 2
-
-
- // ---------------------------------------------------------------------------
- // • SCAPIWindow Class
- // ---------------------------------------------------------------------------
-
- class SCAPIWindow : public LWindow,
- public LListener
- {
- friend class SCAPIApp;
-
- // ===========================================================
- // === Spunk Cross API, these are the routines you can use ===
- // ===========================================================
-
- // • Constructor - Destructor
- // --------------------------
-
- public:
-
- SCAPIWindow( SCAPIApp* inAppP,
- char* inTitle = SCAPIWindow_default_title,
- int inOriginx = SCAPIWindow_default_originx,
- int inOriginy = SCAPIWindow_default_originy,
- int inWidth = SCAPIWindow_default_width,
- int inHeight = SCAPIWindow_default_height );
-
- virtual ~SCAPIWindow();
-
-
- // • Member functions
- // ------------------
-
- public:
-
- void AssociateMenuBar(SCAPIMenuBar* inMenuBarP);
-
-
- protected:
-
- virtual void ExecuteCommand(int inCommand);
-
- virtual void CommandStatus( int inCommand,
- bool &outEnabled,
- int &outMark,
- char* outName );
-
-
- // =================================
- // === Internal part, do not use ===
- // =================================
-
- // • Member functions
- // ------------------
-
- private:
-
- void DrawAssociateMenuBar();
-
- virtual void ActivateSelf();
-
- void FreeMenuBar();
-
- virtual Boolean ObeyCommand( CommandT inCommand,
- void* ioParam );
-
- virtual void FindCommandStatus( CommandT inCommand,
- Boolean &outEnabled,
- Boolean &outUsesMark,
- Char16 &outMark,
- Str255 outName );
-
- virtual void ListenToMessage(MessageT inMessage, void *ioParam);
-
-
- // • Member variables
- // ------------------
-
- private:
-
- SCAPIMenuBar* mMenuBarP;
- SCAPIApp* mAppP;
-
-
- // • Static variables
- // ------------------
-
- private:
-
- static int sNumWindows;
- };
-
- #endif